#!/usr/bin/python

'''for tips of this problem, pls visit http://home.earthlink.net/~usondermann/eulertot.html '''

import mathex

def main():
    i = 0
    n = 1
    m = n
    while n<=1000000:
        m = n
        n = n* mathex.primeList[i]
        i += 1
    print m
    return 

if __name__ == '__main__':
    main()
    
